package com.ruoyi.develop.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.develop.mapper.NewMemberDevelopMapper;
import com.ruoyi.develop.domain.NewMemberDevelop;
import com.ruoyi.develop.service.INewMemberDevelopService;

/**
 * 新团员发展Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class NewMemberDevelopServiceImpl implements INewMemberDevelopService 
{
    @Autowired
    private NewMemberDevelopMapper newMemberDevelopMapper;

    /**
     * 查询新团员发展
     * 
     * @param nmdId 新团员发展主键
     * @return 新团员发展
     */
    @Override
    public NewMemberDevelop selectNewMemberDevelopByNmdId(Long nmdId)
    {
        return newMemberDevelopMapper.selectNewMemberDevelopByNmdId(nmdId);
    }

    /**
     * 查询新团员发展列表
     * 
     * @param newMemberDevelop 新团员发展
     * @return 新团员发展
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<NewMemberDevelop> selectNewMemberDevelopList(NewMemberDevelop newMemberDevelop)
    {
        return newMemberDevelopMapper.selectNewMemberDevelopList(newMemberDevelop);
    }

    /**
     * 新增新团员发展
     * 
     * @param newMemberDevelop 新团员发展
     * @return 结果
     */
    @Override
    public int insertNewMemberDevelop(NewMemberDevelop newMemberDevelop)
    {
        return newMemberDevelopMapper.insertNewMemberDevelop(newMemberDevelop);
    }

    /**
     * 修改新团员发展
     * 
     * @param newMemberDevelop 新团员发展
     * @return 结果
     */
    @Override
    public int updateNewMemberDevelop(NewMemberDevelop newMemberDevelop)
    {
        newMemberDevelop.setUpdateTime(DateUtils.getNowDate());
        return newMemberDevelopMapper.updateNewMemberDevelop(newMemberDevelop);
    }

    /**
     * 批量删除新团员发展
     * 
     * @param nmdIds 需要删除的新团员发展主键
     * @return 结果
     */
    @Override
    public int deleteNewMemberDevelopByNmdIds(Long[] nmdIds)
    {
        return newMemberDevelopMapper.deleteNewMemberDevelopByNmdIds(nmdIds);
    }

    /**
     * 删除新团员发展信息
     * 
     * @param nmdId 新团员发展主键
     * @return 结果
     */
    @Override
    public int deleteNewMemberDevelopByNmdId(Long nmdId)
    {
        return newMemberDevelopMapper.deleteNewMemberDevelopByNmdId(nmdId);
    }
}
